Skip to content

fix: prevent branch review ledger merge conflicts#1154

Merged
BigSimmo merged 3 commits into
mainfrom
codex/prevent-review-ledger-conflicts
Jul 24, 2026
Merged

fix: prevent branch review ledger merge conflicts#1154
BigSimmo merged 3 commits into
mainfrom
codex/prevent-review-ledger-conflicts

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Mark docs/branch-review-ledger.md with Git's built-in merge=union driver so concurrent append-only review records are retained automatically.
  • Add a self-tested ledger integrity guard that blocks conflict markers, exact duplicate rows, loss of the union attribute, or removal of the append-only policy.
  • Run the guard in verify:cheap and the Static PR CI job.
  • Clarify in AGENTS.md and the review protocol that corrections must be appended rather than rewriting historical records.

Why

Multiple active PRs append review records at the shared table tail. Standard three-way merges repeatedly conflict in that single file, and conflict scaffolding has previously been committed. Union merging plus a blocking integrity gate removes the recurring conflict and catches malformed resolutions before merge.

Files and areas touched

  • .gitattributes
  • .github/workflows/ci.yml
  • AGENTS.md
  • docs/branch-review-ledger.md
  • docs/codex-review-protocol.md
  • package.json
  • scripts/check-branch-review-ledger.mjs

Verification

  • npm run check:branch-review-ledger — passed; 688 records, union merge active, negative self-tests passed.
  • npm run check:gate-manifest — passed; all 22 local cheap gates are represented in CI.
  • npm run check:github-actions — passed.
  • npm run check:ci-scope — passed.
  • Prettier and git diff --check — passed.
  • npm run verify:cheap — static gates, lint, and typecheck passed; unit suite reached 3,284 passed / 1 skipped / 1 failed. The unrelated tests/reconciliation-preflight.test.ts metadata-only subprocess exceeded its fixed 30-second timeout.
  • Focused rerun node scripts/run-vitest.mjs run tests/reconciliation-preflight.test.ts --reporter=dot — reproduced the same unrelated timeout with the other 4 tests passing.

Checks not run

  • Full verify:pr-local was not repeated because its unit stage would hit the same reproduced unrelated timeout; exact-head hosted required CI is the merge gate.
  • No browser, OpenAI, Supabase, Railway, deployment, production-data, or live clinical workflow ran.

Risk and rollback

Risk is low and limited to Git/process behavior. Union merging can retain both sides in non-deterministic order, which is acceptable for append-only records; the integrity gate blocks conflict markers and exact duplicates. Roll back by reverting this commit, which restores standard merge behavior and removes the new gate.

RAG impact: no retrieval behaviour change — Git merge policy, review documentation, and static CI validation only.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

1 similar comment
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@supabase

supabase Bot commented Jul 24, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@BigSimmo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 21 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a2bade1f-5c17-4b17-9433-9e50d5587b93

📥 Commits

Reviewing files that changed from the base of the PR and between 1c30a9d and b215818.

📒 Files selected for processing (7)
  • .gitattributes
  • .github/workflows/ci.yml
  • AGENTS.md
  • docs/branch-review-ledger.md
  • docs/codex-review-protocol.md
  • package.json
  • scripts/check-branch-review-ledger.mjs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/prevent-review-ledger-conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo merged commit 329ea48 into main Jul 24, 2026
19 checks passed
@BigSimmo
BigSimmo deleted the codex/prevent-review-ledger-conflicts branch July 24, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant